#include "qprojectplugin.h"

#include "qprojectwidget.h"

#include <qplugin.h>
#include <QIcon>
#include <QVariant>

QString QProjectPlugin::pluginName()
{
    return "Project.Plugin";
}

void QProjectPlugin::createWidget()
{
    m_widget=new QProjectWidget;
    m_widget->setProperty("panelwidget",true);
    m_widget->setProperty("page_position",getPageName());
}

QString QProjectPlugin::getPageName()
{
    return tr("Project");
}

QIcon QProjectPlugin::getPageIcon()
{
    return QIcon(":/images/project.png");
}

int QProjectPlugin::getIndex()
{
    return 1;
}

bool QProjectPlugin::getEnabled()
{
    return true;
}

bool QProjectPlugin::pagePosition(const QVariant &param)
{
    return ((QProjectWidget*)m_widget)->pagePosition(param);
}

Q_EXPORT_PLUGIN2(QProjectPlugin,QProjectPlugin)
